﻿<Window x:Class="GraphHost.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d3="clr-namespace:InteractiveDataDisplay.WPF;assembly=InteractiveDataDisplay.WPF"
        Title="Graph Plotter: a demo host for LENS compiler" Height="480" Width="640">
    <Border BorderBrush="Black" BorderThickness="1" Margin="16" Padding="16">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
        
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="16" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="2*" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="2*" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                
                <TextBlock Text="Graph:" />
                <TextBox x:Name="Func" Grid.Column="1" Grid.ColumnSpan="5" Margin="8,0" Text="y = Math::Sin x" />
                
                <TextBlock Text="From:" Grid.Row="2" />
                <TextBox x:Name="StartPos" Grid.Row="2" Grid.Column="1" Text="-10" Margin="8,0" />

                <TextBlock Text="To:" Grid.Row="2" Grid.Column="2" />
                <TextBox x:Name="EndPos" Grid.Row="2" Grid.Column="3" Text="10" Margin="8,0" />
                
                <TextBlock Text="Step:" Grid.Row="2" Grid.Column="4" />
                <TextBox x:Name="Step" Grid.Row="2" Grid.Column="5" Text="0.1" Margin="8,0" />
                
                <Button Grid.Column="6" Grid.RowSpan="3" Content="Run" Click="Run_OnClick" Padding="16,0" />
            </Grid>
            <d3:Chart Grid.Row="1" Margin="0,16,0,0">
                <d3:LineGraph x:Name="Graph" Stroke="Green" StrokeThickness="2" Description="Graph" />
            </d3:Chart>
        </Grid>
    </Border>
</Window>
